<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
  <title>管理员添加</title>

  <script type="text/javascript">
    function checkLength(){
      //确定输入的长度
      var domAccount = document.getElementById("account").value;
      var domPassword = document.getElementById("password").value;
      if(domAccount.length < 6){
        alert("账号最少输入6字符");
      }else if(domPassword.length < 6){
        alert("密码最少输入6字符");
      }
    }
  </script>

</head>
<body>
<center>
  <form action="/hexu/administrator/add" method="get">
    管理员账号
    <input type="text" name="account" id="account" placeholder="账号在6~12个字符之间" size="22"
           maxlength="12"/>
    <p>管理员密码
      <input type="text" name="password" id="password" placeholder="密码在6~12个字符之间" size="22"
             maxlength="12"/></p>
    <p>
      <input type="submit" value="添加" onclick="checkLength()"/>
      <input type="reset" /></p>
  </form>

</center>
</body>

</html>